package jt.classic.app.clgl.clsqd.impl;

 

import jt.classic.app.clgl.clsqd.IClsqd;

import org.limp.basework.AbstractSimpleBean;
import org.limp.mine.StringTool;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


public class IClsqdImpl extends AbstractSimpleBean implements IClsqd {
	
	public String	clsqd_id	; 	//	车单号
	public String	clsqd_ycdw	; 	//	用车单位
	public String	clsqd_yxr	; 	//	用车人
	public String	clsqd_dh	; 	//	电话
	public String	clsqd_ycsjq	; 	//	用车时间起
	public String	clsqd_ycsjz	; 	//	用车时间止
	public String	clsqd_mdd	; 	//	目的地
	public String	clsqd_ccsj	; 	//	出车时间
	public String	clsqd_cls	; 	//	车辆数
	public String	clsqd_zt	; 	//	状态
	public String	clsqd_tjr	; 	//	提交人
	public String	clsqd_bz	; 	//	备注

    private List cl_jsy = new ArrayList(); //车辆 驾驶员

    /**
     * s
     */
    public List cl_jsy() {return this.cl_jsy; }

    public String	clsqd_id() {return this.clsqd_id;}      
    public String	clsqd_ycdw() {return this.clsqd_ycdw;}  
    public String	clsqd_yxr() {return this.clsqd_yxr;}    
    public String	clsqd_dh() {return this.clsqd_dh;}      
    public String	clsqd_ycsjq() {return this.clsqd_ycsjq;}
    public String	clsqd_ycsjz() {return this.clsqd_ycsjz;}
    public String	clsqd_mdd() {return this.clsqd_mdd;}    
    public String	clsqd_ccsj() {return this.clsqd_ccsj;}  
    public String	clsqd_cls() {return this.clsqd_cls;}    
    public String	clsqd_zt() {return this.clsqd_zt;}      
    public String	clsqd_tjr() {return this.clsqd_tjr;}    
    public String	clsqd_bz() {return this.clsqd_bz;}   

    /**
     * 商品集合编辑页面，商品列表 html代码
     */
    public String getCl_JSY_ListHtml() {
        String txt = "";
        int cl_jsy_num=0;
        for (int i = 0; i < this.cl_jsy.size(); i++) {
            String clxx_id = ((Map) cl_jsy.get(i)).get("CLXX_ID").toString();
            String clxx_name = ((Map) cl_jsy.get(i)).get("CLXX_PZH").toString();
            String jsy_id = ((Map) cl_jsy.get(i)).get("JSY_ID").toString();
            String jsy_name = ((Map) cl_jsy.get(i)).get("JSY_XM").toString();
            
            cl_jsy_num = cl_jsy_num + 1;
         	txt += " <div id='" + cl_jsy_num + "' dtype='cl_jsy_obj' dname='" + "" + "'>";
            txt += "<table border='0' width='450'><tr>";
            
            txt += "<input type=hidden  id='clxx_id" + cl_jsy_num + "' value='" + clxx_id + "' size=2 /></td>";
            txt += "<td width='25%'><input readonly type=text class='box3' id='clxx_name" + cl_jsy_num + "' value='" + clxx_name + "' size=20 /></td>";
            txt += "<td width='20%'><a herf='#' onclick='add_clxx(" + cl_jsy_num + ")'>指派车辆</a></td>";
            
             txt += "<input type=hidden  id='jsy_id" + cl_jsy_num + "' value='" + jsy_id + "' size=2 /></td>";
            txt += "<td width='25%'><input readonly type=text class='box3' id='jsy_name" + cl_jsy_num + "' value='" + jsy_name + "' size=20 /></td>";
            txt += "<td width='20%'><a herf='#' onclick='add_jsy(" + cl_jsy_num + ")'>指派驾驶员</a></td>";
           
            txt += "<td width='10%'><span title='删除' style='cursor:hand;' onclick=\"javascript:handleRemove('" + cl_jsy_num + "');\">×</span></td>";
            txt += "</tr></table>";

        }

        return txt;
    }

    public void reload(Map info) {
        if (info != null) {
            this.info = info;
            
            this.clsqd_id= StringTool.checkString(info.get("CLSQD_ID"));
            this.clsqd_ycdw= StringTool.checkString(info.get("CLSQD_YCDW"));
            this.clsqd_yxr= StringTool.checkString(info.get("CLSQD_YXR"));
            this.clsqd_dh= StringTool.checkString(info.get("CLSQD_DH"));
            this.clsqd_ycsjq= StringTool.checkString(info.get("CLSQD_YCSJQ"));
            this.clsqd_ycsjz= StringTool.checkString(info.get("CLSQD_YCSJZ"));
            this.clsqd_mdd= StringTool.checkString(info.get("CLSQD_MDD"));
            this.clsqd_ccsj= StringTool.checkString(info.get("CLSQD_CCSJ"));
            this.clsqd_cls= StringTool.checkString(info.get("CLSQD_CLS"));
            this.clsqd_zt= StringTool.checkString(info.get("CLSQD_ZT"));
            this.clsqd_tjr= StringTool.checkString(info.get("CLSQD_TJR"));
            this.clsqd_bz= StringTool.checkString(info.get("CLSQD_BZ"));

            this.cl_jsy = (List) info.get("CL_JSY");
        }
    }
}
